﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using CIT.WMS.TranseferRM;

namespace CIT.WMS.RM
{
    public partial class FrmRMMain : Form
    {
        public FrmRMMain()
        {
            InitializeComponent();
        }


     
        private void btn_Out_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMOut f = new FrmRMOut();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMOut f = new FrmRMOut();
                f.ShowDialog();
            }
        }

 
        private void btn_inTorr_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMIn f = new FrmRMIn();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMIn f = new FrmRMIn();
                f.ShowDialog();
            }
        }

        private void btnPRInStock_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMPRIn f = new FrmRMPRIn();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMPRIn f = new FrmRMPRIn();
                f.ShowDialog();
            }
        }

        private void btn_TranseIn_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmTranseferIn f = new FrmTranseferIn();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmTranseferIn f = new FrmTranseferIn();
                f.ShowDialog();
            }
        }

        private void btn_TranseOut_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmTranseferOut f = new FrmTranseferOut();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmTranseferOut f = new FrmTranseferOut();
                f.ShowDialog();
            }
        }

        private void BtnReBack_Click(object sender, EventArgs e)
        {

            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMBack f = new FrmRMBack();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMBack f = new FrmRMBack();
                f.ShowDialog();
            }
        }

        private void btnSureOS_Click(object sender, EventArgs e)
        {

            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMConfirmOut f = new FrmRMConfirmOut();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMConfirmOut f = new FrmRMConfirmOut();
                f.ShowDialog();
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            

                if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmRMGroupO f = new FrmRMGroupO();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmRMGroupO f = new FrmRMGroupO();
                f.ShowDialog();
            }
        }

        private void btnCenterCode_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmCenterCode f = new FrmCenterCode();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmCenterCode f = new FrmCenterCode();
                f.ShowDialog();
            }
        }

        private void btnWaifa_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Utils.uContext.UserIDk__BackingField))
            {
                FrmCheckUser frm = new FrmCheckUser();
                frm.ShowDialog();
                if (frm.flag)
                {
                    FrmWaifa f = new FrmWaifa();
                    f.ShowDialog();
                }
            }
            else
            {
                FrmWaifa f = new FrmWaifa();
                f.ShowDialog();
            }
        }



    }
}